<template>
    <!-- 聊天室 -->
    <div class="video-page ">
        <div class="video-panel">
            <audio id="dingding">
                <source src="@/assets/music/dingding.mp3" type="audio/mpeg">
            </audio>
            <el-button @click.native="tipMusicBtn" ref="upload" v-show="false">播放</el-button>
            <el-row type="flex" class="row-bg" justify="space-between" :gutter="20">
                <el-col :span="6">
                    <trtc-video v-if="$global.isTrtc" ref="trtcVideo" :source="patientList"></trtc-video>
                    <agora-video v-else ref="agoraVideo" :source="patientList"></agora-video>
                </el-col>
                <el-col :span="13">
                    <div class="video-frame video-center-top">
                        <div class="video-title u-flex-box flex-row-between">
                            <div>
                                <div class="icon-size">
                                    <img src="@/assets/img/icon_case.png" alt="">
                                </div>
                                <span>问诊病例</span>
                                <div class="icon-size" style="cursor: pointer;" @click="onShowDialog('updatePatient')">
                                    <i class="iconfont iconedit"></i>
                                </div>
                            </div>
                            <div style="cursor: pointer;" @click="enterRemoteConsult">
                                <div class="icon-size">
                                    <img src="@/assets/img/icon_case.png" alt="">
                                </div>
                                <span>进入远程会诊</span>
                            </div>
                            <div class="child-tips" v-if="patientList.isChildOption">
                                {{'患者为'+patientList.isChildOption +'，请谨慎用药' || ''}}
                            </div>
                        </div>
                        <div class="inquiry-frame">
                            <ul class="inquiry-content">
                                <!-- 廉江医院-显示“就诊卡号” -->
                                <li v-if="$global.platform('lj')" class="content-big">就诊卡号：{{patientList.healthCardNo}}</li>
                                <li>姓名：{{patientList.patientName}}</li>
                                <li>性别：{{patientList.patientSex == "0"? '女':patientList.patientSex == "1"? '男':''}}</li>
                                <li>生日：{{patientList.patientBirthday}}</li>
                                <li>体重(kg)：{{patientList.patientWeight}}</li>
                                <li>职业：{{patientList.patientProfession}}</li>
                                <li>婚否：{{$util.filterByIds(patientList.isMarried, $dict.marriedIds)}}</li>
                                <li>手机号码：{{patientList.patientPhone}}</li>
                                <li>身份证：{{patientList.patientIdcard}}</li>
                                <li>籍贯：{{patientList.patientMaritalStatus}}</li>
                                <li>住址：{{patientList.patientAddress}}</li>
                                <li>食物/药物过敏史：{{patientList.patientAllergyDetails||'无'}}
                                    <span class="icon-size" @click="openDialog('allergyHistoryDialog')">
                                        <i class="iconfont iconedit"></i>
                                    </span>
                                </li>
                                <li>孕/哺乳/备孕：{{patientList.isChildOption||'无'}}
                                    <!-- <span class="icon-size" @click="openDialog('childOptionDialog')">
                                        <i class="iconfont iconedit"></i>
                                    </span> -->
                                </li>
                                <li>
                                    付费类型：
                                    <!-- <template v-if="$global.isYiBao"> -->
                                    <span>{{$util.filterByIds(patientList.paymentMethod, $dict.paymentMethodIds)}}</span>
                                    <span v-if="$global.isYiBao" class="icon-size" @click="onShowDialog('payment')">
                                        <i class="iconfont iconedit"></i>
                                    </span>
                                    <!-- </template>
                                    <template v-else>自费</template> -->
                                </li>
                                <li>医疗机构：{{patientList.hospitalName}}</li>
                                <li :class="{'content-middle': !($global.platform('zh') && patientList.paymentMethod == 2)}">问诊时间：{{patientList.acceptsTime}}</li>
                                <!-- 珠海医院-医保付费显示病种 -->
                                <li v-if="$global.platform('zh') && patientList.paymentMethod == 2">
                                    病种名称：
                                    <template>
                                        <span>{{patientList.diseaseName}}</span>
                                        <span class="icon-size" @click="onShowDialog('disease')">
                                            <i class="iconfont iconedit"></i>
                                        </span>
                                    </template>
                                </li>
                                <li>医疗科室：{{patientList.departmentName}}</li>
                                <li class="content-middle">就诊医生：{{patientList.doctorName}}</li>
                                <li class="content-big">医嘱：{{patientList.detailsEntrust}}
                                    <span class="icon-size" @click="openDialog('drAdviceDialog')">
                                        <i class="iconfont iconedit"></i>
                                    </span>
                                </li>
                                <li class="content-big">初诊医院：
                                    <span>{{patientList.primaryHospital}}</span>
                                    <span class="chatroom-inquiry-tips">（初诊医院、就诊人信息需与上传的病历资料一致，否则请结束当前问诊）</span>
                                </li>
                                <li class="content-big">主诉：{{patientList.mainSuit}}
                                    <span class="icon-size" @click="openDialog('chiefComplaintDialog','1')">
                                        <i class="iconfont iconedit"></i>
                                    </span>
                                </li>
                                <li class="content-big">现病史：{{patientList.presentIllness}}
                                    <span class="icon-size" @click="openDialog('chiefComplaintDialog','2')">
                                        <i class="iconfont iconedit"></i>
                                    </span>
                                </li>
                                <li class="content-big">既往史：{{patientList.historyPresentIllness}}
                                    <span class="icon-size" @click="openDialog('chiefComplaintDialog','3')">
                                        <i class="iconfont iconedit"></i>
                                    </span>
                                </li>
                                <li class="content-big">
                                    <span>诊断：</span>
                                    <span class="tag-name-group">
                                        <span v-for="(item, index) in patientList.diagnosisArray" :key="index">
                                            <span v-if="index !== 0">,</span>
                                            {{item.diagnosis}}
                                        </span>
                                    </span>
                                    <span class="icon-size" @click="openDiagnosisDialog(patientList.diagnosisArray)">
                                        <i class="iconfont iconedit"></i>
                                    </span>
                                </li>
                                <li class="content-big">
                                    <span>报告意见单：</span>
                                    <!-- 测试隐藏判断条件  -->
                                    <template v-if="patientList.mainSuit && patientList.diagnosis">
                                        <span class="check-err-tips" v-if="$global.platform('hainan')">暂未开通，敬请期待</span>
                                        <template v-else>
                                            <span class="icon-size check-tag-plus" title="新增报告意见单" @click="openCheckDialog('add')">
                                                <i class="iconfont iconedit"></i>
                                            </span>
                                            <template v-if="patientList.inspectionOpinionList">
                                                <div v-for="(tag, idx) in patientList.inspectionOpinionList" :key="idx" class="check-tag-item">
                                                    <span class="name" @click="getEstablishPdf(tag.id,3)">{{tag.applicationFormNo || ''}}</span>
                                                    <!-- <el-link :underline="false" class="btn" type="primary">打印</el-link :underline="false"> -->
                                                    <el-link :underline="false" class="btn" type="primary" @click="openCheckDialog('edit', tag.id)">编辑</el-link>
                                                    <el-link :underline="false" class="btn" type="danger" @click="deleteCheckItem('advice', tag.id)">删除</el-link>
                                                </div>
                                            </template>
                                        </template>
                                    </template>
                                    <span class="check-err-tips" v-else>请先填写主诉和诊断</span>
                                </li>
                                <li class="content-big">检验检查申请单：
                                    <!-- 测试隐藏判断条件 -->
                                    <template v-if="patientList.mainSuit && patientList.diagnosis">
                                        <span class="check-err-tips" v-if="$global.platform('hainan')">暂未开通，敬请期待</span>
                                        <template v-else>
                                            <span class="icon-size check-tag-plus" title="新增申请单" @click="openApplicationDialog('add')">
                                                <i class="iconfont iconedit"></i>
                                            </span>
                                            <template v-if="patientList.formListResult">
                                                <div v-for="(tag, idx) in patientList.formListResult" :key="idx" class="check-tag-item">
                                                    <span class="name" @click="getEstablishPdf(tag.id,5,tag.templateValue)">{{tag.applicationFormNo || ''}}</span>
                                                    <!-- <el-link :underline="false" class="btn" type="primary">打印</el-link :underline="false"> -->
                                                    <el-link :underline="false" class="btn" type="primary" @click="openApplicationDialog('edit', tag.id, tag.templateValue)">编辑</el-link>
                                                    <el-link :underline="false" class="btn" type="danger" @click="deleteCheckItem(tag.templateValue, tag.id)">删除</el-link>
                                                </div>
                                            </template>
                                        </template>
                                    </template>
                                    <span class="check-err-tips" v-else>请先填写主诉和诊断</span>
                                </li>
                                <li class="content-big">健康指导：
                                    <span v-if="patientList.mainSuit && patientList.diagnosis">
                                        <el-button size="mini" type="primary" plain v-for="(item,index) in patientList.inquiryLogHealthGuidanceList" :key="index" @click="getEstablishPdf(item.id,2)">
                                            {{item.healthGuidanceNo}}
                                        </el-button>
                                        <span class="icon-size" @click="openHealthDialog"><i class="iconfont iconedit"></i></span>
                                    </span>
                                    <span class="check-err-tips" v-else>请先填写主诉和诊断</span>
                                </li>
                                <li class="content-big">电子处方：
                                    <el-button size="mini" type="primary" plain v-for="(item,index) in patientList.prescriptionList" :key="index" @click="getEstablishPdf(item.id,4)">
                                        {{item.prescriptionNo}}
                                    </el-button>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="video-frame video-center-bottom">
                        <div :class="['chat__handle', {'placeholder-2': ($global.platform('zh') && patientList.paymentMethod == 2)}, {'placeholder': !($global.platform('zh') && patientList.paymentMethod == 2)}]">
                            <div class="handle__item" @click="openDialog('caseHistory')">
                                <img class="item__icon" src="@/assets/img/icon_medical_record.png" alt="">
                                <p class="item__txt">查询病历</p>
                            </div>
                            <div class="handle__item" @click="openDialog('hisDialog')">
                                <img class="item__icon" src="@/assets/img/icon_medical_record.png" alt="">
                                <p class="item__txt">his查询</p>
                            </div>
                            <div class="handle__item" @click="openDialog('westernMedicineDialog')">
                                <img class="item__icon" src="@/assets/img/icon_western_medicine.png" alt="">
                                <p class="item__txt">西药处方</p>
                            </div>
                            <!-- 珠海医院-医保付费隐藏“中药处方” -->
                            <div v-show="!($global.platform('zh') && patientList.paymentMethod == 2)" class="handle__item" @click="openDialog('chineseMedicineDialog')">
                                <img class="item__icon" src="@/assets/img/icon_traditional_chinese_medicine.png" alt="">
                                <p class="item__txt">中药处方</p>
                            </div>
                            <div class="handle__item" @click="openDialog('measuredDataDialog')">
                                <img class="item__icon" src="@/assets/img/icon_data.png" alt="">
                                <p class="item__txt">测量数据</p>
                                <p v-if="isChangeMsg" class="red-tips"></p>
                            </div>
                            <div class="handle__item" @click="openDialog('sendPicDialog')">
                                <img class="item__icon" src="@/assets/img/icon_send_pictures.png" alt="">
                                <p class="item__txt">发送图片</p>
                            </div>
                            <div class="handle__item" @click="openDialog('picDataDialog')">
                                <img class="item__icon" src="@/assets/img/icon_picture.png" alt="">
                                <p class="item__txt">查询图片</p>
                            </div>
                            <div class="handle__item" @click="openDialog('proposalDataDialog')">
                                <img class="item__icon" src="@/assets/img/icon_hospitalization.png" alt="">
                                <p class="item__txt">住院建议书</p>
                            </div>
                            <div v-if="$global.isEntity" class="handle__item" @click="linkTo('interface')">
                                <img class="item__icon" src="@/assets/img/icon_standard.png" alt="">
                                <p class="item__txt">远程影像</p>
                            </div>
                            <div v-else class="handle__item" @click="openDialog('standardDataDialog')">
                                <img class="item__icon" src="@/assets/img/icon_standard.png" alt="">
                                <p class="item__txt">问诊规范</p>
                            </div>
                            <div class="handle__item" @click="openDialog('finishDataDialog')">
                                <img class="item__icon" src="@/assets/img/icon_end.png" alt="">
                                <p class="item__txt">结束问诊</p>
                            </div>
                            <div class="handle__item" @click="reservedInquiry" v-if="patientList.inquiryType == '3'|| patientList.inquiryType == '4'">
                                <img class="item__icon" src="@/assets/img/icon_consultation.png" alt="">
                                <p class="item__txt">保留问诊</p>
                            </div>
                        </div>
                    </div>
                </el-col>
                <el-col :span="5">
                    <div class="video-frame video-right-top" v-if="logId && logId != null">
                        <div class="video-title" style="margin-bottom:10px;">
                            <div class="icon-size">
                                <img src="@/assets/img/icon_wait.png" alt="">
                            </div>
                            <span class="user-inquiry">当前为{{patientList.inquiryType == '1' ? '视频问诊':patientList.inquiryType == '3' ? '家庭医生':patientList.inquiryType == '4' ? '复诊':'图文问诊'}}</span>
                        </div>
                        <div class="user-msg">
                            <div class="user-img">
                                <img v-if="patientList.patientImg" :src="patientList.patientImg" alt="">
                                <div class="user-line-tag">
                                    <div class="outline-size" type="info" v-if="patientList.isOnline == 0">离线</div>
                                    <div class="online-size" type="success" v-else>在线</div>
                                </div>
                            </div>
                            <div class="user-info">
                                <span class="user-name">{{patientList.patientName || '暂无'}}</span>
                                <el-tag class="user-tag" size="mini">{{patientList.patientAge|| '0'}}岁</el-tag>
                                <p class="user-age">
                                    <span>性别: {{patientList.patientSex == '1' ? '男':'女'}}</span>
                                    <span class="age-size">来源: {{patientList.userType == 'S'? '服务点': '个人'}}</span>
                                </p>
                            </div>
                            <div class="user-btn" v-if="patientList.inquiryType != '3' && patientList.inquiryType != '4'">
                                <el-button type="primary" size="mini" @click="triageInquiry(patientList,1)">分诊</el-button>
                                <!-- <el-button type="primary" size="mini">转诊</el-button> -->
                            </div>
                        </div>
                        <div class="chat-box video-right-bottom">
                            <div class="chat-content" id="scrollContent">
                                <p class="chat-history" v-if="!noHistoryChat && chatRoomMsgList.length >= 20" @click="getChatRecordList(3)">点击加载历史记录</p>
                                <div v-for="(item,index) in chatRoomMsgList" :key="index">
                                    <p class="chat-head">
                                        <span v-if="item.msgType != 4 && item.msgType != 5 && item.msgType != 6" :class="patientList.doctorName != item.msgUserName ? 'chat-color' :''">[{{friendId == item.friendId? patientList.doctorName :(item.msgUserName || patientDetailList.patientName)}}]</span>
                                        <span v-if="item.msgType != 4 && item.msgType != 5 && item.msgType != 6 && item.msgUserName == patientDetailList.doctorName && patientList.inquiryType != '1'&& patientList.inquiryType != '2'" :class="item.isRead == 0 ? 'chat-not-read chat-read' :'chat-read'">
                                            {{item.isRead == 0? '未读': '已读'}}
                                        </span>
                                        <span v-if="item.msgType != 5 && item.msgType != 6">{{item.msgDate}}</span>
                                    </p>
                                    <div class="chat-msg" v-if="item.msgType == 3" @contextmenu.prevent="openMenu(item,$event)">
                                        <viewer style="display:inilne-block;">
                                            <img :src="item.msgText" width="100" title="点击预览">
                                        </viewer>
                                    </div>
                                    <p class="chat-msg" v-if="item.msgType == 0" @contextmenu.prevent="openMenu(item,$event)">{{item.msgText}}</p>
                                    <p class="chat-msg" v-if="item.msgType == 4">{{item.msgText}}</p>
                                    <el-alert v-if="item.msgType == 5" class="chat-alert" :title="item.msgText" type="info" center :closable="false"> </el-alert>
                                    <ul class="chat-withdraw" v-if="isWithdraw && item.msgType != 4" :style="{left:left+'px',top:top+'px'}">
                                        <li @click="withdrawHandle(item.msgDate)">撤回</li>
                                        <li @click="isWithdraw = false">取消</li>
                                    </ul>
                                </div>
                            </div>
                            <el-row class="chat-btn" type="flex" justify="space-between">
                                <el-popover class="popover-msg" placement="top" width="300" trigger="click" v-model="popoverMsg">
                                    <div class="popover-title">常规问诊话术表</div>
                                    <ul class="popover-ul">
                                        <li v-for="(item,index) in quickMsglist" :key="index" @click="doctorSendMsg('quick',item)">{{index+1>9?index+1:"0"+(index+1)}}{{'. '}} {{item.content}}</li>
                                    </ul>
                                    <el-button size="small" type="primary" slot="reference" icon="el-icon-plus" @click="getQuickMsg"></el-button>
                                </el-popover>
                                <el-input size="small" class="btn-input" v-model="sendMsgToPatient" @keyup.enter.native="doctorSendMsg">
                                    <el-button slot="append" size="small" type="primary" @click="doctorSendMsg">发送</el-button>
                                </el-input>
                            </el-row>
                        </div>
                    </div>
                    <div :class="(logId && this.logId != null) ? 'video-frame video-right-moddle':'video-frame video-lineup'">
                        <div class="video-title">
                            <div class="icon-size">
                                <img src="@/assets/img/icon_wait.png" alt="">
                            </div>
                            <span>候诊列表（{{lineUpPatientList.length > 0 ? lineUpPatientList.length : 0}}）</span>
                        </div>
                        <div class="user-list">
                            <el-button class="online-change" size="mini" v-for="(item,index) in filterBar" :key="index" :class="{active: item.type == changeBtn}" @click="changeOnlineState(item.type)">
                                {{item.name}}
                            </el-button>
                        </div>
                        <div class="list-tips">
                            复诊、家庭医生问诊患者可选择离线接诊，
                            保留问诊可将患者保留在候诊列表下次接诊。
                            <div>消息推送勿扰时段为 0:00~7:00,请妥善安排时间。</div>
                        </div>
                        <div :class="(logId && this.logId != null) ? 'line-patientlist-short':'line-patientlist-height'">
                            <div class="user-msg" v-for="(item,index) in lineUpPatientList" :key="index">
                                <el-badge v-if="item.latestMessageCount && item.latestMessageCount > 0" :value="item.latestMessageCount" :max="99" :class="item.latestMessageCount < 9 ? 'user-badge' :item.latestMessageCount > 99 ? 'user-badge user-badge-large': 'user-badge  user-badge-small'">
                                </el-badge>
                                <div class="user-img">
                                    <img v-if="item.avatar" :src="item.avatar" alt="头像">
                                    <div class="user-line-tag">
                                        <div class="outline-size" type="info" v-if="item.isOnline == 0">离线</div>
                                        <div class="online-size" type="success" v-else>在线</div>
                                    </div>
                                </div>
                                <div class="user-info">
                                    <span class="user-name">{{item.nickname}}</span>
                                    <el-tag class="user-tag" size="mini">{{item.age || '0'}}岁</el-tag>
                                    <span class="user-inquiry">{{item.inquiryType == '1' ? '视频问诊':item.inquiryType == '3' ? '家庭医生':item.inquiryType == '4' ? '复诊':'图文问诊'}}</span>
                                    <p class="user-age">
                                        <span>性别: {{item.sex == '1' ? '男':item.sex == '0' ?'女':'保密'}}</span>
                                        <span class="age-size">来源: {{item.userType == 'S'? '服务点': '个人'}}</span>
                                    </p>
                                </div>
                                <div class="user-btn">
                                    <!-- <div v-if="item.inquiryType != '1' && item.inquiryType != '2'"> </div>-->
                                    <el-button type="primary" size="mini" @click="getPatientJoinRoom(item)">接诊</el-button>
                                    <el-button type="primary" plain size="mini" @click="triageInquiry(item,2)" :disabled="item.inquiryType == '3' || item.inquiryType == '4'">分诊</el-button>
                                </div>
                            </div>
                            <!-- <div class="user-btn">
                                <span>48小时免费咨询体验</span>
                                <el-button type="primary" size="mini" @click="replyInquiry">回复</el-button>
                            </div> -->
                        </div>
                    </div>
                </el-col>
            </el-row>
        </div>

        <!--打开pdf弹框 start-->
        <pdf-dialog ref="pdfDialog" :has-save="false" @closed="flag => getPatientInfo()"></pdf-dialog>

        <!--发送图片弹框 -->
        <el-dialog class="dialog-frame" title="发送图片" :visible.sync="sendPicDialog" v-if="sendPicDialog" @close="closeDialog('sendPicDialog')" :close-on-click-modal="false" :close-on-press-escape="false">
            <div>
                <my-image-upload ref="uploadPic" :upload-params="ossParams" :img-url="imageUrl" @change="val => handleChangeUpload(val, 'imageUrl')"></my-image-upload>
            </div>
            <div class="dialog-btn">
                <el-button type="primary" @click="sendPic" :loading="sendPicLoading" :disabled="sendPicLoading">发送</el-button>
            </div>
        </el-dialog>

        <!--测量数据弹框 -->
        <el-dialog class="dialog-frame " width="800" :visible.sync="measuredDataDialog" @close="closeDialog('measuredDataDialog')" :close-on-click-modal="false" :close-on-press-escape="false">
            <div slot="title" class="title-size">
                <div class="title-icon">
                    <img src="@/assets/img/img_decorate.png" alt="">
                </div>
                <span>录入测量数据</span>
            </div>
            <el-table :data="measuredList" style="width: 100%" max-height="500" highlight-current-row>
                <el-table-column prop="createTime" label="录入时间">
                    <template slot-scope="scope">
                        <span>{{scope.row.createTime || '-'}} </span>
                    </template>
                </el-table-column>
                <el-table-column prop="dataAnimalHeat" label="体温  (℃)">
                    <template slot-scope="scope">
                        <span>{{scope.row.dataAnimalHeat || '-'}} </span>
                    </template>
                </el-table-column>
                <el-table-column prop="dataHeartRate" label="心率  (次/分钟)">
                    <template slot-scope="scope">
                        <span>{{scope.row.dataHeartRate || '-'}} </span>
                    </template>
                </el-table-column>
                <el-table-column prop="dataSbp" label="收缩压  (mmHg)">
                    <template slot-scope="scope">
                        <span>{{scope.row.dataSbp || '-'}} </span>
                    </template>
                </el-table-column>
                <el-table-column prop="dataDbp" label="舒张压  (mmHg)">
                    <template slot-scope="scope">
                        <span>{{scope.row.dataDbp || '-'}} </span>
                    </template>
                </el-table-column>
                <el-table-column prop="dataRr" label="呼吸频率  (次/分钟)">
                    <template slot-scope="scope">
                        <span>{{scope.row.dataRr || '-'}} </span>
                    </template>
                </el-table-column>
                <el-table-column prop="dataGlu" label="血糖(mmoI/L)">
                    <template slot-scope="scope">
                        <span>{{scope.row.dataGlu || '-'}} </span>
                    </template>
                </el-table-column>
                <el-table-column prop="dataCondition" label="测量条件">
                    <template slot-scope="scope">
                        <span>{{scope.row.dataCondition || '-'}} </span>
                    </template>
                </el-table-column>
                <el-table-column prop="dataParameter" label="测量参考">
                    <template slot-scope="scope">
                        <span>{{scope.row.dataParameter || '-'}} </span>
                    </template>
                </el-table-column>
            </el-table>
            <el-pagination style="text-align:center;margin:15px 25px;" @current-change="changeMeasuredCurrent" :current-page="measuredListPage.current" :page-size="measuredListPage.size" layout="prev, pager, next,total" :total="measuredListPage.total">
            </el-pagination>
            <div slot="footer" class="dialog-btn">
                <el-button type="primary" class="btn-size" size="small" @click="closeDialog('measuredDataDialog')">关闭</el-button>
            </div>
        </el-dialog>
        <!--查询图片弹框 -->
        <el-dialog class="dialog-frame pic-dialog" width="600" :visible.sync="picDataDialog" @close="closeDialog('picDataDialog')" :close-on-click-modal="false" :close-on-press-escape="false">
            <div slot="title" class="title-size">
                <div class="title-icon">
                    <img src="@/assets/img/img_decorate.png" alt="">
                </div>
                <span>查询图片</span>
            </div>
            <div v-if="chatImages && chatImages.length > 0">
                <viewer style="display:inilne-block;">
                    <img v-for="(item,index) in chatImages" :src="item.msgContent" :key="index" width="142" title="点击预览">
                </viewer>
            </div>
            <div v-else class="text-tip">
                暂无图片
            </div>
        </el-dialog>
        <!--住院建议书弹框 -->
        <el-dialog class="dialog-frame proposal-dialog" width="600" :visible.sync="proposalDataDialog" @close="closeDialog('proposalDataDialog')" :close-on-click-modal="false" :close-on-press-escape="false">
            <div slot="title" class="title-size">
                <div class="title-icon">
                    <img src="@/assets/img/img_decorate.png" alt="">
                </div>
                <span>住院建议书</span>
                <span class="title-tips">* 请认真确认信息，以免影响用户入院</span>
            </div>
            <div v-if="isOpenProposal == false">
                <el-form class="proposal-form" :model="proposalForm" :rules="proposalFormRule" ref="proposalForm" label-position="left" label-width="100px">
                    <el-form-item class="form-size" label="姓名：" prop="name" width="45%">
                        <!-- <el-input type="text" v-model="proposalForm.identity" auto-complete="off" placeholder="姓名" size="small" :disabled="true"></el-input> -->
                        {{patientList.patientName}}
                    </el-form-item>
                    <el-form-item class="form-size" label="身份证号：" prop="name">
                        {{patientList.patientIdcard}}
                        <!-- <el-input v-model="proposalForm.identity" size="small" auto-complete="off" placeholder="身份证号" :disabled="true"></el-input> -->
                    </el-form-item>
                    <el-form-item class="form-size" label="性别：" prop="sexName">
                        <!--  <el-radio v-model="proposalForm.sexName" label="男"></el-radio>
                    <el-radio v-model="proposalForm.sexName" label="女"></el-radio> -->
                        {{patientList.patientSex == 0? '女':'男'}}
                    </el-form-item>
                    <el-form-item class="form-size" prop="phone" label="联系方式：">
                        <!-- <el-input type="text" size="small" v-model="proposalForm.phone" auto-complete="off" placeholder="联系方式" :disabled="true"></el-input> -->
                        {{patientList.patientPhone}}
                    </el-form-item>
                    <el-form-item prop="password" label="出生日期：">
                        <!-- <el-input size="small" v-model="proposalForm.date" auto-complete="off" placeholder="联系方式" :disabled="true"></el-input> -->
                        {{patientList.patientBirthday}}
                    </el-form-item>
                    <el-form-item prop="symptoms" label="主要症状：">
                        <!-- <el-input size="small" v-model="proposalForm.symptoms" auto-complete="off" placeholder="主要症状" :disabled="true"></el-input> -->
                        {{patientList.mainSuit}}
                    </el-form-item>
                    <el-form-item prop="preliminary" label="初步诊断：">
                        <!-- <el-input size="small" v-model="proposalForm.preliminary" auto-complete="off" placeholder="初步诊断" :disabled="true"></el-input> -->
                        <span v-for="(item, index) in patientList.diagnosisArray" :key="index">
                            <span v-if="index !== 0">,</span>
                            {{item.diagnosis}}
                        </span>
                    </el-form-item>
                    <el-form-item label="建议：" prop="hospitalizationDepartment">
                        <span style="color:#757575;font-size:14px">因病情需要，请前往{{patientList.hospitalName}}</span>
                        <!-- <el-input class="input-size" size="small" auto-complete="off" placeholder="请输入医院" :disabled="true"></el-input> -->
                        <div>
                            <el-input class="input-size" size="small" v-model="proposalForm.hospitalizationDepartment" placeholder="请输入科室"></el-input>，办理住院
                        </div>
                    </el-form-item>
                    <el-form-item prop="remark" label="备注：">
                        <el-input type="textarea" placeholder="请输入内容" v-model="proposalForm.remark" maxlength="200" show-word-limit></el-input>
                    </el-form-item>
                </el-form>
                <div slot="footer" class="dialog-btn">
                    <el-button type="primary" class="btn-size" size="small" @click="addInquiryLogHospitalization">确定生成</el-button>
                </div>
            </div>
        </el-dialog>
        <!--问诊规范弹框 start -->
        <el-dialog class="dialog-frame standard-dialog" width="600" :visible.sync="standardDataDialog" @close="closeDialog('standardDataDialog')" :close-on-click-modal="false" :close-on-press-escape="false">
            <div slot="title" class="title-size">
                <div class="title-icon">
                    <img src="@/assets/img/img_decorate.png" alt="">
                </div>
                <span>问诊规范</span>
            </div>
            <div>
                <el-tabs v-model="standardActiveName" @tab-click="handleStandardClick">
                    <el-tab-pane label="问诊流程" name="1">
                        <div class="search-control">
                            <el-input v-model="standardSearch" size="small" class="search-input"></el-input>
                            <el-button type="primary" class="btn-size" size="small" @click="getDoctorNormalConsultationList({page: 1})">搜 索</el-button>
                        </div>
                        <el-table class="l-table" :data="standardList" border max-height="300" highlight-current-row>
                            <el-table-column label="序号" width="90">
                                <template slot-scope="scope">
                                    <span v-text="scope.$index + (standardPage.current - 1)*standardPage.size + 1"></span>
                                </template>
                            </el-table-column>
                            <el-table-column prop="content" label="话术内容">
                                <template slot-scope="scope">
                                    <span>{{scope.row.content || '-'}} </span>
                                </template>
                            </el-table-column>
                        </el-table>
                        <el-pagination style="text-align:center;margin:15px 25px;" @current-change="changeStandardTableCurrent" :current-page="standardPage.current" :page-size="standardPage.size" layout="prev, pager, next,total" :total="standardPage.total">
                        </el-pagination>
                    </el-tab-pane>
                    <el-tab-pane label="药品规范" name="2">
                        <div class="search-control">
                            <el-input v-model="standardDrugSearch" size="small" class="search-input"></el-input>
                            <el-button type="primary" class="btn-size" size="small" @click="getDrugSpeciFicationList({page: 1})">搜 索</el-button>
                        </div>
                        <el-table class="l-table" :data="standardDrugList" border max-height="300" highlight-current-row>
                            <el-table-column prop="drugName" label="名称">
                                <template slot-scope="scope">
                                    <span>{{scope.row.drugName || '-'}} </span>
                                </template>
                            </el-table-column>
                            <el-table-column prop="drugSpecifications" label="规格">
                                <template slot-scope="scope">
                                    <span>{{scope.row.drugSpecifications || '-'}} </span>
                                </template>
                            </el-table-column>
                            <el-table-column prop="" label="操作" width="120">
                                <template slot-scope="scope">
                                    <span class="table-btn-size" @click="checkDrugSpeciFicationDetail(scope.row)">详情</span>
                                    <span class="table-btn-size" @click="checkDrugInfo(scope.row)">查看</span>
                                </template>
                            </el-table-column>
                        </el-table>
                        <el-pagination style="text-align:center;margin:15px 25px;" @current-change="changeDrugTableCurrent" :current-page="standardDrugPage.current" :page-size="standardDrugPage.size" layout="prev, pager, next,total" :total="standardDrugPage.total">
                        </el-pagination>
                    </el-tab-pane>
                    <el-tab-pane label="诊断规范" name="3">
                        <div class="search-control">
                            <el-input v-model="standardDiagnosisSearch" size="small" class="search-input"></el-input>
                            <el-button type="primary" class="btn-size" size="small" @click="getDiagnosisList({page: 1})">搜 索</el-button>
                        </div>
                        <el-table class="l-table" :data="diagnosisList" border max-height="300" highlight-current-row>
                            <el-table-column prop="name" label="诊断名称">
                                <template slot-scope="scope">
                                    <span>{{scope.row.diagnosisName || '-'}} </span>
                                </template>
                            </el-table-column>
                            <el-table-column prop="size" label="限制性别">
                                <template slot-scope="scope">
                                    <span>{{scope.row.diagnosisSex == '1'? '男':scope.row.diagnosisSex == '0'? '女': '-'}} </span>
                                </template>
                            </el-table-column>
                            <el-table-column prop="size" label="限制年龄">
                                <template slot-scope="scope">
                                    <span>{{scope.row.diagnosis_dage}} - {{scope.row.diagnosis_tage}} </span>
                                </template>
                            </el-table-column>
                            <el-table-column prop="size" label="限制使用">
                                <template slot-scope="scope">
                                    <span>{{scope.row.isRestriction== '0'? '否':scope.row.diagnosisSex == '1'? '是': '-'}} </span>
                                </template>
                            </el-table-column>
                        </el-table>
                        <el-pagination style="text-align:center;margin:15px 25px;" @current-change="changeDiagnosisTableCurrent" :current-page="diagnosisPage.current" :page-size="diagnosisPage.size" layout="prev, pager, next,total" :total="diagnosisPage.total">
                        </el-pagination>
                    </el-tab-pane>
                </el-tabs>
            </div>
        </el-dialog>
        <!-- 查看 -->
        <el-dialog class="dialog-frame" width="300" :visible.sync="standardDetailDialog" @close="closeDialog('standardDetailDialog')" :close-on-click-modal="false" :close-on-press-escape="false">
            <div slot="title" class="title-size">
                <div class="title-icon">
                    <img src="@/assets/img/img_decorate.png" alt="">
                </div>
                <span>药品详情</span>
            </div>
            <div>
                <p>最大用量（剂量单位）：{{standardDrugDetailList.drugMaxDosagePack||'-'}}</p>
                <p>最大用量（最小单位）：{{standardDrugDetailList.drugMaxDosageSmall||'-'}}</p>
                <p>最大用量（补充单位）：{{standardDrugDetailList.drugMaxDosageOther||'-'}}</p>
                <p>最大频次：{{standardDrugDetailList.drugMaxfrequency||'-'}}</p>
                <p>最大天数：{{standardDrugDetailList.drugMaxday||'-'}}</p>
                <p>配伍禁忌结果列表：
                    <ul style="margin:0 15px;" v-for="(item, index) in standardDrugDetailList.utilIncompatibilityListByIdResult" :key="index">
                        <li>{{item.drugName}} <span style="margin:0 15px;">{{item.drugOtherName}}</span></li>
                    </ul>
                </p>
            </div>
        </el-dialog>
        <!-- 药品信息详情 -->
        <el-dialog class="dialog-frame drug-specification-dialog" width="300" :visible.sync="drugSpeciFicationDetailDialog" @close="closeDialog('drugSpeciFicationDetailDialog')" :close-on-click-modal="false" :close-on-press-escape="false">
            <div slot="title" class="title-size">
                <div class="title-icon">
                    <img src="@/assets/img/img_decorate.png" alt="">
                </div>
                <span>药品信息</span>
            </div>
            <div>
                <div class="drugMap-img">
                    <img v-if="ficationDetailList.drugImg" :src="ficationDetailList.drugImg" alt="">
                </div>
                <div class="drugs-name drug-specifica">
                    <p class="name-size">{{ficationDetailList.drugName}}</p>
                    <p>规格：{{ficationDetailList.drugSpecifications || '-'}}</p>
                    <p>参考价格：{{ficationDetailList.drugPrice || '-'}}</p>
                </div>
                <div class="drugs-name drug-specifica">
                    <p>别名：{{ficationDetailList.alias || '-'}}</p>
                    <p>通用名：{{ficationDetailList.commonName || '-'}}</p>
                    <p>来源：{{ficationDetailList.storeName || '-'}}</p>
                </div>
                <div class="drugs-name drug-specifica">
                    <p>药品类型：{{ficationDetailList.drugType == '1' ? '中药': '西药' || '-'}}</p>
                    <p>产地：{{ficationDetailList.drugOrigin || '-'}}</p>
                    <p>厂商：{{ficationDetailList.drugCompany || '-'}}</p>
                </div>
                <div class="dialog-content">
                    {{ficationDetailList.drugInstructions|| '暂无药品说明详情'}}
                </div>
            </div>
        </el-dialog>
        <!--问诊规范弹框 end -->
        <!--结束问诊弹框 start-->
        <el-dialog class="dialog-frame dialog-finish" width="600" :visible.sync="finishDataDialog" @close="closeDialog('finishDataDialog')" :close-on-click-modal="false" :close-on-press-escape="false">
            <div slot="title" class="title-size">
                <div class="title-icon">
                    <img src="@/assets/img/img_decorate.png" alt="">
                </div>
                <span>结束问诊</span>
            </div>
            <div class="finish-frame" v-loading="finishLoading" element-loading-text="" element-loading-background="rgba(255,255,255,.7)">
                <p class="finish-tips">是否已经确认与用户沟通清楚？确认结束问诊？</p>
                <div class="finish-reason">
                    <span>是否首诊：</span>
                    <el-radio-group v-model="firstVisit">
                        <el-radio :label="0">否</el-radio>
                        <el-radio :label="1">是</el-radio>
                    </el-radio-group>
                </div>
                <div class="finish-reason" v-if="firstVisit === 0 && (!patientList.prescriptionList || patientList.prescriptionList.length <= 0)">
                    <span>未开处方原因：</span>
                    <el-select v-model="finishReasonSearch" placeholder="请选择未开处方原因">
                        <el-option value='' label="请选择未开处方原因"></el-option>
                        <el-option v-for="(item,index) in noPrescriptionList" :key="index" :label="item.reasonsName" :value="item.reasonsName">
                        </el-option>
                    </el-select>
                </div>
                <el-alert v-if="isVedioOrPic == '3'" title="本次问诊类型为家庭医生，未成功问诊可退诊金" type="info" :closable="false" center></el-alert>
                <el-alert v-if="isVedioOrPic == '4'" title="本次问诊类型为复诊，未成功问诊可退诊金" type="info" :closable="false" center></el-alert>
                <!-- <div>本次问诊类型为家庭医生，未成功问诊可退诊金</div>
                <div>本次问诊类型为复诊，未成功问诊可退诊金</div> -->
                <div class="finish-btn">
                    <el-button v-if="firstVisit != 1" type="primary" class="btn-size" @click="addNoPrescription">成功问诊</el-button>
                    <el-button type="primary" plain class="btn-size" @click="finishLog">未成功问诊</el-button>
                    <el-button plain class="btn-size" @click="closeDialog('finishDataDialog')">取消</el-button>
                </div>
            </div>
        </el-dialog>
        <!--结束问诊弹框 end -->

        <!--过敏史弹框 start-->
        <el-dialog class="dialog-frame" width="600" title="药物过敏史" :visible.sync="allergyHistoryDialog" @close="closeDialog('allergyHistoryDialog')" :close-on-click-modal="false" :close-on-press-escape="false">
            <div>
                <el-radio v-model="isAllergy" label="1">有过敏史</el-radio>
                <el-radio v-model="isAllergy" label="2">无过敏史</el-radio>
            </div>
            <div v-if="isAllergy == '1'" style="margin-top:20px">
                <el-input v-model="isAllergyInput" style="resize:none;" type="textarea" :autosize="{ minRows: 2, maxRows: 4}"></el-input>
            </div>
            <div slot="footer" class="dialog-btn">
                <el-button size="small" @click="closeDialog('allergyHistoryDialog')">取 消</el-button>
                <el-button type="primary" size="small" :loading="allergyLoading" @click="updateAllergyHistory">确 定</el-button>
            </div>
        </el-dialog>
        <!--过敏史弹框 end -->
        <!--孕/哺乳/备孕 start-->
        <el-dialog class="dialog-frame" width="600" title="孕/哺乳/备孕 " :visible.sync="childOptionDialog" @close="closeDialog('childOptionDialog')" :close-on-click-modal="false" :close-on-press-escape="false">
            <div style="margin-top:20px">
                <el-input v-model="patientList.isChildOption" style="resize:none;" type="textarea" :autosize="{ minRows: 2, maxRows: 4}"></el-input>
            </div>
            <div slot="footer" class="dialog-btn">
                <el-button size="small" @click="closeDialog('childOptionDialog')">取 消</el-button>
                <el-button type="primary" size="small" :loading="allergyLoading" @click="updateChildOption">确 定</el-button>
            </div>
        </el-dialog>
        <!--孕/哺乳/备孕 end -->
        <!--主诉、现病史、既往史弹框 start -->
        <el-dialog class="dialog-frame" width="600" :visible.sync="chiefComplaintDialog" @close="closeDialog('chiefComplaintDialog')" :close-on-click-modal="false" :close-on-press-escape="false">
            <div slot="title" class="title-size" style="position: relative;">
                <div class="title-icon">
                    <img src="@/assets/img/img_decorate.png" alt="">
                </div>
                <span>填写主诉</span>
            </div>
            <el-tabs v-model="chiefComplaintName" @tab-click="handleChiefClick">
                <el-tab-pane label="主诉" name="1">
                    <el-input type="textarea" style="resize:none;" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入主诉" v-model="chiefDialog.chiefInput">
                    </el-input>
                </el-tab-pane>
                <el-tab-pane label="现病史" name="2">
                    <el-input type="textarea" style="resize:none;" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入现病史" v-model="chiefDialog.nowInput">
                    </el-input>
                </el-tab-pane>
                <el-tab-pane label="既往史" name="3">
                    <el-input type="textarea" style="resize:none;" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入既往史" v-model="chiefDialog.pastInput">
                    </el-input>
                </el-tab-pane>
            </el-tabs>
            <div style="position: absolute;top: 67px;right: 30px;">
                <el-button size="small" @click="clearChief">清空{{chiefComplaintName == '1' ? '主诉':chiefComplaintName == '2' ? '现病史' : '既往史'}}</el-button>
                <el-button type="primary" size="small" @click="openDialog('chiefModelDialog')"><i class="el-icon-plus"></i> 新增模板</el-button>
            </div>
            <div class="content-title" style="position: relative;">
                <span>常用模板</span>
                <div style="position: absolute;top: 27px;right: 0;z-index: 999;">
                    <el-input size="small" v-model="templateNameSearch" style="width:150px;" placeholder="请输入搜索信息"></el-input>
                    <el-button type="primary" size="small" @click="getComplaintTemplate"> 搜索 </el-button>
                </div>
                <el-tabs style="margin-top: 5px;" v-model="chiefModelName" @tab-click="handleModelClick">
                    <el-tab-pane label="公用模板" name="0">
                    </el-tab-pane>
                    <el-tab-pane label="个人模板" name="1">
                    </el-tab-pane>
                    <el-table class="l-table" :data="complaintTemplateList" border max-height="300" highlight-current-row>
                        <el-table-column prop="templateName" label="模板名称">
                            <template slot-scope="scope">
                                <span>{{scope.row.templateName || '-'}} </span>
                            </template>
                        </el-table-column>
                        <el-table-column prop="templateDetails" label="模板详情">
                            <template slot-scope="scope">
                                <span>{{scope.row.templateDetails || '-'}} </span>
                            </template>
                        </el-table-column>
                        <el-table-column label="操作">
                            <template slot-scope="scope">
                                <span class="table-btn-size" @click="quoteModel(scope.row)">引用模板</span>
                                <span v-if="chiefModelName != '0'" class="table-btn-size" @click="editModel(scope.row)">编辑模板</span>
                                <span v-if="chiefModelName != '0'" class="table-btn-size table-btn-del" @click="delectModel(scope.row)">删除</span>
                            </template>
                        </el-table-column>
                    </el-table>
                </el-tabs>
            </div>
            <div slot="footer" class="dialog-btn">
                <el-button size="small" @click="closeDialog('chiefComplaintDialog')">取 消</el-button>
                <el-button type="primary" size="small" @click="saveChiefComplaint">保 存</el-button>
            </div>
        </el-dialog>
        <!-- 主诉、现病史、既往史新增 -->
        <el-dialog class="dialog-frame dialog-second" style="" width="400" :visible.sync="chiefModelDialog" @close="closeDialog('chiefModelDialog')" :close-on-click-modal="false" :close-on-press-escape="false">
            <el-form class="proposal-form" :model="chiefModelForm" :rules="chiefModelFormRule" ref="chiefModelForm" label-position="left" label-width="80px">
                <el-form-item label="模板类型" prop="templateType" width="100%">
                    <el-select v-model="chiefModelForm.templateType" style="width:100%" placeholder="模板类型">
                        <el-option value="1" label="主诉"></el-option>
                        <el-option value="2" label="现病史"></el-option>
                        <el-option value="3" label="既往史"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="模板名称" prop="templateName">
                    <el-input type="text" v-model="chiefModelForm.templateName" style="width:100%" auto-complete="off" placeholder="模板名称" size="middle"></el-input>
                </el-form-item>
                <el-form-item prop="templateDetails" label="模板内容" width="100%">
                    <el-input type="textarea" placeholder="请输入内容" style="width:100%;resize:none;" v-model="chiefModelForm.templateDetails" maxlength="500"></el-input>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-btn">
                <el-button size="small" @click="closeDialog('chiefModelDialog')">取 消</el-button>
                <el-button type="primary" size="small" @click="addChiefForm('chiefModelForm')">确 定</el-button>
            </div>
        </el-dialog>
        <!-- 主诉、现病史、既往史弹框 end -->
        <!-- his查询 start -->
        <HisDialog ref="hisDialog" :info="patientList" @closed="closeDialog('hisDialog')"></HisDialog>
        <!-- his查询 end -->
        <!-- 中西药弹框 start -->
        <drug-dialog ref="drugDialog" @closed="closeDialog('westernMedicineDialog')"></drug-dialog>
        <!-- 中西药弹框 end -->
        <!-- 健康指导弹框 start -->
        <health-dialog ref="healthDialog" @closed="closeHealthDialog"></health-dialog>
        <!-- 健康指导弹框 end -->

        <!-- 报告意见单弹框 start -->
        <check-dialog ref="checkDialog" @closed="closeCheckDialog"></check-dialog>
        <!-- 报告意见单弹框 end -->

        <!-- 新增申请单弹框 start -->
        <application-dialog ref="applicationDialog" @closed="closeApplicationDialog"></application-dialog>
        <!-- 新增申请单弹框 end -->
        <!-- 诊断弹框 start -->
        <diagnosis-dialog ref="diagnosisDialogComponent" @closed="val => closeDialogComponent(val,'diagnosisDialogComponent')"></diagnosis-dialog>
        <!-- 诊断弹框 end -->
        <!--用户结束问诊弹框 start-->
        <el-dialog class="dialog-frame  dialog-finish" width="300" :visible.sync="finishInquiryDialog" @close="closeDialog('finishInquiryDialog')" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false">
            <div slot="title" class="title-size">
                <div class="title-icon">
                    <img src="@/assets/img/img_decorate.png" alt="">
                </div>
                <span>结束问诊</span>
            </div>
            <div v-if="isOutline == false" class="finish-frame finish-content">用户已结束问诊</div>
            <div v-if="isOutline == true" class="finish-frame finish-content">用户已下线</div>
            <div class="finish-frame finish-btn">
                <el-button type="primary" size="small" @click="finishInquiry">确定</el-button>
                <!-- <el-button type="primary" size="small" @click="reservedInquiry">保留问诊</el-button> -->
            </div>
        </el-dialog>
        <!--用户结束问诊弹框 end -->
        <!--分诊弹框 start-->
        <el-dialog class="dialog-frame dialog-triage" width="600" :visible.sync="triageInquiryDialog" @close="closeDialog('triageInquiryDialog')" :close-on-click-modal="false" :close-on-press-escape="false">
            <div slot="title" class="title-size">
                <div class="title-icon">
                    <img src="@/assets/img/img_decorate.png" alt="">
                </div>
                <span>申请分诊</span>
            </div>
            <div class="user-msg">
                <div class="user-img" v-if="triageType == 1">
                    <img v-if="triageLogMsg.patientImg" :src="triageLogMsg.patientImg" alt="">
                </div>
                <div class="user-img" v-if="triageType == 2">
                    <img v-if="triageLogMsg.avatar" :src="triageLogMsg.avatar" alt="">
                </div>
                <div class="user-info">
                    <span class="user-name" v-if="triageType == 1">{{triageLogMsg.patientName || '暂无'}}</span>
                    <span class="user-name" v-if="triageType == 2">{{triageLogMsg.nickname || '暂无'}}</span>
                    <span v-if="triageType == 1">性别: {{triageLogMsg.patientSex == '1' ? '男':'女'}}</span>
                    <span v-if="triageType == 2">性别: {{triageLogMsg.sex == '1' ? '男':'女'}}</span>
                    <el-tag v-if="triageType == 1" class="user-tag" size="mini">{{triageLogMsg.patientAge || '0'}}岁</el-tag>
                    <el-tag v-if="triageType == 2" class="user-tag" size="mini">{{triageLogMsg.age|| '0'}}岁</el-tag>
                    <p class="user-age">
                        <span class="age-size">来源: {{triageLogMsg.userType == 'S'? '服务点': '个人'}}</span>
                    </p>
                </div>
            </div>
            <div class="triage-search">科室
                <el-select v-model="departmentNameSearch" placeholder="请选择科室">
                    <el-option label="请选择科室" value="0"></el-option>
                    <el-option v-for="(item,index) in departmentList" :key="index" :label="item.departmentName" :value="item.id"></el-option>
                </el-select>
                <el-input class="triage-doc" placeholder="请输入医生姓名" v-model="doctorNameSearch">
                </el-input>
                <el-button type="primary" size="middle" @click="getOnlineDoctorList">搜索</el-button>
            </div>
            <div>
                <el-table class="l-table" :data="onlineDoctorList" border max-height="300" highlight-current-row>
                    <el-table-column prop="trueName" label="医生">
                        <template slot-scope="scope">
                            <span>{{scope.row.trueName || '-'}} </span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="queueCount" label="候诊人数">
                        <template slot-scope="scope">
                            <span>{{scope.row.queueCount || '0'}} </span>
                        </template>
                    </el-table-column>
                    <el-table-column v-if="triagePatientType == 2" prop="textInterrogation" label="问诊费用">
                        <template slot-scope="scope">
                            <span>{{scope.row.textInterrogation || '-'}} </span>
                        </template>
                    </el-table-column>
                    <el-table-column v-if="triagePatientType == 1" prop="videoInterrogation" label="问诊费用">
                        <template slot-scope="scope">
                            <span>{{scope.row.videoInterrogation || '-'}} </span>
                        </template>
                    </el-table-column>
                    <el-table-column label="操作">
                        <template slot-scope="scope">
                            <span class="table-btn-size" @click="triagePatient(scope.row)">分诊</span>
                        </template>
                    </el-table-column>
                </el-table>
            </div>
        </el-dialog>
        <!--分诊弹框 end -->
      <el-dialog
          class="dialog-frame dialog-triage"
          width="600"
          :visible.sync="applyDialog"
          @close="closeDialog('triageInquiryDialog')"
          :close-on-click-modal="false"
          :close-on-press-escape="false">
          <div slot="title" class="title-size">
            <div class="title-icon">
              <img src="@/assets/img/img_decorate.png" alt="">
            </div>
            <span>申请会诊</span>
          </div>

          <ApplyConsultation
             v-if="applyDialog"
             :applyQuery="applyQuery"
             :is-component="true"
             :patientList="patientList"
             @close="applyDialog = false"
            />
      </el-dialog>

        <!-- 修改患者资料弹框  -->
        <update-patient-dialog ref="updatePatient" @submited="onSubmitDialog()"></update-patient-dialog>


        <!-- 编辑付费类型 -->
        <the-dialog :cfg="paymentCfg" :loading="paymentLoading" :need-close-modal="false" @closed="onCloseDialog('payment')" @submited="submitPaymentForm">
            <template slot="body">
                <el-form class="x-form" ref="paymentForm" :model="paymentForm" :rules="paymentRules" :disabled="paymentLoading" size="small" label-width="120px">
                    <el-form-item label="付费类型" prop="paymentMethod">
                        <el-select class="o-select--full" v-model="paymentForm.paymentMethod" placeholder="请选择付费类型">
                            <el-option v-for="(o,idx) in $dict.paymentMethodIds" :key="idx" :label="o.name" :value="o.id">
                            </el-option>
                        </el-select>
                    </el-form-item>
                </el-form>
            </template>
        </the-dialog>


        <!-- 医保：修改病种 -->
        <update-disease ref="updateDisease" @submited="onSubmitDialog()"></update-disease>

        <!-- ------------------ 医嘱 ------------------ -->
        <dr-advice-dialog ref="drAdviceDialog" @submited="onSubmitDialog()"></dr-advice-dialog>

        <!-- ------------------ 查看病历 ------------------ -->
        <case-history ref="caseHistory"></case-history>

        <!-- ------------------ 住院建议书 ------------------ -->
        <hospital-advice ref="hospitalAdvice"></hospital-advice>
    </div>
</template>

<script src="./js/VideoInquiryRoom.js"></script>
<style lang="scss" src="@/style/page/vedio.scss"></style>
